package com.canbot.u05.activity.presidemode.newcode.bean;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.Objects;

public class DanceBean implements Serializable {
    private String path;
    private String content;
    private String actionID;
    private int time;
    private int type = NModuleType.DANCE_ADD;
    private boolean isSelect;
    private int resBkId;
    private String imageUrl;
    private String standardPath;
    private int standardActionTime;

    public int getStandardActionTime() {
        return standardActionTime;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isSelect() {
        return isSelect;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DanceBean danceBean = (DanceBean) o;
        return Objects.equals(path, danceBean.path) &&
                Objects.equals(content, danceBean.content) &&
                Objects.equals(actionID, danceBean.actionID);
    }

    @Override
    public int hashCode() {
        return Objects.hash(path, content, actionID);
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public DanceBean() {
    }

    public boolean isStandardAudio() {
        return !TextUtils.isEmpty(standardPath) && standardPath.equals(path);
    }

    public DanceBean(String content, String path, String actionID) {
        this.path = path;
        this.content = content;
        this.actionID = actionID;
    }

    public DanceBean(String content, String path, String actionID, int resBkId, int time) {
        this.standardPath = this.path = path;
        this.content = content;
        this.actionID = actionID;
        this.resBkId = resBkId;
        this.standardActionTime = this.time = time;
    }

    public DanceBean(String content, String path, String actionID, String url, int time) {
        this.standardPath = this.path = path;
        this.content = content;
        this.actionID = actionID;
        this.imageUrl = url;
        this.standardActionTime = this.time = time;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getResBkId() {
        return resBkId;
    }

    public String getActionID() {
        return actionID;
    }

    public void setActionID(String actionID) {
        this.actionID = actionID;
    }

    @Override
    public String toString() {
        return "DanceBean{" +
                "path='" + path + '\'' +
                ", content='" + content + '\'' +
                ", actionID='" + actionID + '\'' +
                '}';
    }
}
